//
//  Comment.h
//  WeiboPad
//
//  Created by junmin liu on 10-10-6.
//  Copyright 2010 Openlab. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <sqlite3.h>
#import "NSDictionaryAdditions.h"
#import "User.h"
#import "Status.h"

@interface Comment : NSObject {
	long long		commentId; // comment ID
	NSNumber*		commentKey;
	NSString*		text; //comment data
	time_t			createdAt; //comment time
	NSString*		source; //comment source
	NSString*		sourceUrl; 
	BOOL			favorited; //is favorite
	BOOL			truncated; //is truncated
	User*			user; //commenter info
	Status*			status; //comment weibo
	Comment*		replyComment; //reply comment source
}

@property (nonatomic, assign) long long		commentId; 
@property (nonatomic, retain) NSNumber*		commentKey;
@property (nonatomic, readonly) NSString*         timestamp;
@property (nonatomic, retain) NSString*		text; 
@property (nonatomic, assign) time_t			createdAt; 
@property (nonatomic, retain) NSString*		source; 
@property (nonatomic, retain) NSString*		sourceUrl; 
@property (nonatomic, assign) BOOL			favorited; 
@property (nonatomic, assign) BOOL			truncated; 
@property (nonatomic, retain) User*			user; 
@property (nonatomic, retain) Status*			status; 
@property (nonatomic, retain) Comment*		replyComment; 


- (Comment*)initWithJsonDictionary:(NSDictionary*)dic;

+ (Comment*)commentWithJsonDictionary:(NSDictionary*)dic;

@end
